import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

//引入组件
import login from "../components/main/login.vue"
import manage from "../components/main/manage.vue"
import userList from "../components/subComponents/userList.vue"
import rolelist from "../components/subComponents/jurisdiction/rolelist.vue"
import powerlist from "../components/subComponents/jurisdiction/powerlist.vue"
import goodsList from "../components/subComponents/goods/goodList.vue"
import paramsClass from "../components/subComponents/goods/paramsClass.vue"
import goodsClass from "../components/subComponents/goods/goodsClass.vue"
import orderList from "../components/subComponents/orderList.vue"
import data from "../components/subComponents/data.vue"
import add from "../components/subComponents/addGoods/add.vue"

export default new Router({

  routes: [
    {
      path: '/',
      redirect: "/login"
    },
    {
      path: "/login",
      component: login
    },
    {
      path: "/manage",
      component: manage,
      redirect:"/userlist",
      children: [
        {
          path:"/userlist",
          component: userList
        },
        {
          path:"/rolelist",
          component:rolelist
        },
        {
          path:"/powerlist",
          component:powerlist
        },
        {
          path: "/goodsList",
          component: goodsList
        },
        {
          path:"/goodsList/add",
          component: add

        },
        {
          path: "/paramsClass",
          component: paramsClass
        },
        {
          path: "/goodsClass",
          component: goodsClass
        },
        {
          path: "/orderList",
          component: orderList
        },
        {
          path: "/data",
          component:data
        }
      ]
    },
    
  ]
})
